package com.xique.common.core.constant;

import lombok.experimental.UtilityClass;

/**
 * 通用常量信息
 *
 * @author xique
 */
@UtilityClass
public class Constants {

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 5;

    /**
     * 令牌有效期（分钟）
     */
    public static final long TOKEN_EXPIRE = 720;

    /**
     * 岗亭令牌有效期（分钟）
     */
    public static final long CLIENT_EXPIRE = 10080;

    /**
     * 岗亭令牌有效期（分钟）
     */
    public static final long API_EXPIRE = 120;

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";


    /**
     * 表关联字段缓存
     */
    public static final String SYS_FIELD_VALUE_KEY = "sys_field_value:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 永久时间上限
     */
    public static final String FOREVER_TIME = "2037-12-31 23:59:59";

    public static final String FOREVER_DATE = "2037-12-31";

    public static final String FOREVER_STR = "永久";

    /**
     * 表记录状态：正常
     */
    public static final String NORMAL = "normal";

    public static final String PAUSE = "pause";

    public static final String YES = "Y";

    public static final String NO = "N";

    public static final String MESSAGE = "message";

    public static final String BR = "<br />";

    public static final String LIST = "list";

    public static final String TOTAL = "total";

    public static final String RESULT_CODE = "result_code";

    public static final int FALSE = 0;

    public static final int TRUE = 1;
}
